package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.ProjectEnvironmentParamsMapper;
import com.ruoyi.project.domain.ProjectEnvironmentParams;
import com.ruoyi.project.service.IProjectEnvironmentParamsService;

/**
 * 项目环境参数Service业务层处理
 * 
 * @author yhg
 * @date 2022-10-19
 */
@Service
public class ProjectEnvironmentParamsServiceImpl implements IProjectEnvironmentParamsService 
{
    @Autowired
    private ProjectEnvironmentParamsMapper projectEnvironmentParamsMapper;

    /**
     * 查询项目环境参数
     * 
     * @param id 项目环境参数主键
     * @return 项目环境参数
     */
    @Override
    public ProjectEnvironmentParams selectProjectEnvironmentParamsById(Long id)
    {
        return projectEnvironmentParamsMapper.selectProjectEnvironmentParamsById(id);
    }

    /**
     * 查询项目环境参数列表
     * 
     * @param projectEnvironmentParams 项目环境参数
     * @return 项目环境参数
     */
    @Override
    public List<ProjectEnvironmentParams> selectProjectEnvironmentParamsList(ProjectEnvironmentParams projectEnvironmentParams)
    {
        return projectEnvironmentParamsMapper.selectProjectEnvironmentParamsList(projectEnvironmentParams);
    }

    /**
     * 新增项目环境参数
     * 
     * @param projectEnvironmentParams 项目环境参数
     * @return 结果
     */
    @Override
    public int insertProjectEnvironmentParams(ProjectEnvironmentParams projectEnvironmentParams)
    {
        projectEnvironmentParams.setCreateTime(DateUtils.getNowDate());
        return projectEnvironmentParamsMapper.insertProjectEnvironmentParams(projectEnvironmentParams);
    }

    /**
     * 修改项目环境参数
     * 
     * @param projectEnvironmentParams 项目环境参数
     * @return 结果
     */
    @Override
    public int updateProjectEnvironmentParams(ProjectEnvironmentParams projectEnvironmentParams)
    {
        projectEnvironmentParams.setUpdateTime(DateUtils.getNowDate());
        return projectEnvironmentParamsMapper.updateProjectEnvironmentParams(projectEnvironmentParams);
    }

    /**
     * 批量删除项目环境参数
     * 
     * @param ids 需要删除的项目环境参数主键
     * @return 结果
     */
    @Override
    public int deleteProjectEnvironmentParamsByIds(Long[] ids)
    {
        return projectEnvironmentParamsMapper.deleteProjectEnvironmentParamsByIds(ids);
    }

    /**
     * 删除项目环境参数信息
     * 
     * @param id 项目环境参数主键
     * @return 结果
     */
    @Override
    public int deleteProjectEnvironmentParamsById(Long id)
    {
        return projectEnvironmentParamsMapper.deleteProjectEnvironmentParamsById(id);
    }
}
